package fr.upstlse.glre.client.vo;

import com.google.gwt.user.client.ui.HTML;

public class EtudiantVOGWT extends UserVOGWT {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 3129673658098642621L;
	private String nom;
	private String prenom;
	private String email;
    private String telephonefixe;
    private String telephoneportable;
    private int adressenumero;
    private String adressevoie;
    private String adressecodepostal;
    private String adresseville;
    private String adressepays;
	
	
	public EtudiantVOGWT() {
		super();
		nom = null;
		prenom = null;
		email = null;
	    telephonefixe = null;
	    telephoneportable = null;
	    adressenumero = 0;
	    adressevoie = null;
	    adressecodepostal = null;
	    adresseville = null;
	    adressepays = null;
	}

	
	public EtudiantVOGWT(String nom, String prenom, String email,
			String telephonefixe, String telephoneportable, int adressenumero,
			String adressevoie, String adressecodepostal, String adresseville,
			String adressepays, long id, String login, String password, String role) {
		super(id, login, password, role);
		this.nom = nom;
		this.prenom = prenom;
		this.email = email;
		this.telephonefixe = telephonefixe;
		this.telephoneportable = telephoneportable;
		this.adressenumero = adressenumero;
		this.adressevoie = adressevoie;
		this.adressecodepostal = adressecodepostal;
		this.adresseville = adresseville;
		this.adressepays = adressepays;
	}


	public String getNom() {
		return nom;
	}
	public void setNom(String nom) {
		this.nom = nom;
	}
	public String getPrenom() {
		return prenom;
	}
	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}


	public String getTelephonefixe() {
		return telephonefixe;
	}


	public void setTelephonefixe(String telephonefixe) {
		this.telephonefixe = telephonefixe;
	}


	public String getTelephoneportable() {
		return telephoneportable;
	}


	public void setTelephoneportable(String telephoneportable) {
		this.telephoneportable = telephoneportable;
	}


	public int getAdressenumero() {
		return adressenumero;
	}


	public void setAdressenumero(int adressenumero) {
		this.adressenumero = adressenumero;
	}


	public String getAdressevoie() {
		return adressevoie;
	}


	public void setAdressevoie(String adressevoie) {
		this.adressevoie = adressevoie;
	}


	public String getAdressecodepostal() {
		return adressecodepostal;
	}


	public void setAdressecodepostal(String adressecodepostal) {
		this.adressecodepostal = adressecodepostal;
	}


	public String getAdresseville() {
		return adresseville;
	}


	public void setAdresseville(String adresseville) {
		this.adresseville = adresseville;
	}


	public String getAdressepays() {
		return adressepays;
	}


	public void setAdressepays(String adressepays) {
		this.adressepays = adressepays;
	}
	
	public HTML getHTMLProfil() {
		HTML lHTML = new HTML();
		String lRes = "";
		String lNomPrenom = "<p>" + getNom() + " "
				+ getPrenom() + "</p>";
		String lEmail = "<p>" + getEmail() + "</p>";
		
		String lTelephoneDebut = "<div class='telephoneBlock'>";
		String lTelephoneFin = "</div>";
		String lTelephoneTitre = "<div class='titre'>Téléphone</div>";
		String lTelephoneFixe = "<p>Fixe: " + getTelephonefixe() + "</p>";
		String lTelephonePortable = "<p>Portable: " + getTelephoneportable() + "</p>";
		String lTelephone = lTelephoneDebut + lTelephoneTitre +  lTelephoneFixe + lTelephonePortable + lTelephoneFin;
		
		String lAdresseDebut = "<div class='adresseBlock'>";
		String lAdresseFin = "</div>";
		String lAdresseTitre = "<div class='titre'>Adresse</div>";
		String lAdresseNumeroVoie = "<p>" + getAdressenumero() + ", " + getAdressevoie() + "</p>";
		String lAdresseCodePostalVille = "<p>" + getAdressecodepostal() + " " + getAdresseville() + "</p>";
		String lAdressePays = "<p>" + getAdressepays() + "</p>";
		String lAdresse = lAdresseDebut + lAdresseTitre +  lAdresseNumeroVoie + lAdresseCodePostalVille + lAdressePays+ lAdresseFin;
		
		lRes = lNomPrenom + lEmail + lTelephone + lAdresse;
		lHTML.setHTML(lRes);

		return lHTML;
	}
	
}
